<?php

declare(strict_types=1);

namespace Modules\Member\Models;

use Catch\Base\CatchModel as Model;
use Illuminate\Auth\Authenticatable;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Support\Facades\Redis;
use Laravel\Sanctum\HasApiTokens;

/**
 */
class MembersVirtual extends Model implements AuthenticatableContract
{
    use Authenticatable, HasApiTokens;

    protected $table = 'members_virtual';

    public $timestamps = true;


    protected $fillable = [
        'id',
        'user_id',
        'status',
        'username',
        'avatar',
        'user_level',
        'disable_price',
        'price',
        'pid',
        'withdraw_all',
        'lose_all',
        'publish_count',
        'friend_count',
        'publish_order_count',
        'today_order_count',
        'profit',
        'sum',
        'count',
        'status',
        'created_at',
        'updated_at',
        'deleted_at',
        'v1','v2','v3','v4','v5'
    ];

    protected array $fields = [
        'id',
        'user_id',
        'status',
        'username',
        'avatar',
        'user_level',
        'disable_price',
        'price',
        'pid',
        'withdraw_all',
        'lose_all',
        'publish_count',
        'friend_count',
        'publish_order_count',
        'today_order_count',
        'profit',
        'sum',
        'count',
        'status',
        'created_at',
        'updated_at',
        'deleted_at',
        'v1','v2','v3','v4','v5'
    ];
    public array $searchable = [
        'username' => 'like',
        'id' => '=',
        'user_level' => '=',
        'status' => '=',
    ];

}
